package br.unip.tcc.domotic.controller;

import java.util.HashMap;
import java.util.Map;

import javax.faces.bean.ManagedBean;

import org.hibernate.FetchMode;

import br.unip.tcc.domotic.bean.AbstractBean;
import br.unip.tcc.domotic.bean.HomeTypeBean;
import br.unip.tcc.domotic.exception.FilterException;
import br.unip.tcc.domotic.model.HomeTypeModel;

@ManagedBean
public class HomeTypeController extends AbstractController<HomeTypeBean, HomeTypeModel> {
	
	private static final long serialVersionUID = 1L;
	
	@Override
	public void setBeanId(Integer id) {
		getBean().setHomeTypeId(id);
	}
	
	@Override
	public Integer extractBeanId(AbstractBean bean) {
		return ((HomeTypeBean)bean).getHomeTypeId();
	}
	
	@Override
	public String getBeanIdName() {
		return "homeTypeId";
	}
	
	@Override
	public String getUpdateRedirectPage() {
		return "";
	}
	
	@Override
	public Map<String, FetchMode> getDefaultJoins() {
		return new HashMap<String, FetchMode>();
	}

	@Override
	public Map<String, String> getDeafautOrdersBy() {
		return new HashMap<String, String>();
	}

	@Override
	public void validateFilterSearch() throws FilterException {
	}
	
}
